import { requestGet, requestPost } from "./request/request";



/**
 * 获取供应商商品
 * @param {*} obj
 */
export const getSupplierGoods = (obj) => {
  return requestGet("api/wechat/GetSupplierGoods", obj);
};


/**
 * 获取供应商的所有类别和类别下商品
 * @param {*} obj
 */
export const SupplierGetTypesAndGoods = (obj) => {
  return requestGet("/api/WeChat/Supplier_GetTypesAndGoods", obj);
};


/**
 * 补货
 * @returns
 */
export const supplierBuhuo = (obj) => {
  return requestPost("api/wechat/buhuo", obj);
};


/**
 * 设置活动商品 /折扣商品
 * @param {*} obj
 * @returns
 */
export const promoteGoods = (obj) => {
  return requestPost("api/wechat/Supplier_PromoteGoods", obj);

};

/**
 * 取消活动商品
 * @param {*} obj
 * @returns
 */
export const cancelPromoteGoods = (obj) => {
  return requestPost("api/wechat/Supplier_CancelPromoteGoods", obj);
};



/**
 * 商品置顶/取消置顶
 * @returns
 */
export const goodsTop = (obj) => {
  return requestPost("api/wechat/Supplier_GoodsTop", obj);
};


/**
 * 商品上架/下架
 * @param {*} obj
 * @returns
 */
export const goodsShelve = (obj) => {
  return requestPost("api/wechat/Supplier_GoodsShelve", obj);
};


/**
 * 获取商品类别
 * @returns
 */
export const getGoodsTypes = (obj) => {
  return requestGet("api/wechat/Supplier_GetGoodsTypes", obj);

};

/**
 * 新增类别
 * @param {*} obj
 * @returns
 */
export const addGoodsType = (obj) => {
  return requestPost("api/wechat/Supplier_AddGoodsType", obj);

};


/**
 * 删除类别
 * @param {*} obj
 */
export const deleteType = (obj) => {
  return requestPost("api/wechat/Supplier_DeleteType", obj);
};

/**
 * 编辑类别
 * @param {*} obj
 */
export const editType = (obj) => {
  return requestPost("api/wechat/Supplier_EditType", obj);
};


/**
 * 类别置顶
 * @param {*} obj
 */
export const typeTop = (obj) => {
  return requestPost("api/wechat/Supplier_TypeTop", obj);
};


/**
 * 类别置顶
 * @param {*} obj
 */
export const uploads = (obj) => {
  return requestPost("api/resource/upload", obj);
};


/**
 * 新增商品
 */
export const SupplierAddGoods = (obj) => {
  return requestPost("api/wechat/SupplierAddGoods", obj);
}


/**
 * 获取单个商品详情 供应商
 */
export const getSingleSupplierGoods = (obj) => {
  return requestGet("api/WeChat/GetSingleSupplierGoods", obj);
}

/**
* 修改商品类型
*/
export const updateGoodsType = (obj) => {
  return requestPost("api/WeChat/Supplier_UpdateGoodsType", obj);
}

/**
* 更新商品日期
*/
export const updateBirthday = (obj) => {
  return requestPost("api/WeChat/Supplier_UpdateBirthday", obj);
}

/**
* 获取商品资质
*/
export const getGoodsQualifications = (obj) => {
  return requestGet("api/WeChat/GetGoodsQualifications", obj);
}


/**
* 新增商品资质
*/
export const addQualifications = (obj) => {
  return requestPost("api/WeChat/AddQualifications", obj);
}


/**
* 删除商品资质
*/
export const deleteQualifications = (obj) => {
  return requestPost("api/WeChat/DeleteQualifications", obj);
}



/**
* 商品资质上传
*/
export const UploadQualifications = (obj) => {
  return requestPost("api/Resource/UploadQualifications", obj);
}